from blog import db


class UserBase(db.Model):
    __tablename__ = 'userbase'  # 表名

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50))
    email = db.Column(db.String(150))
    password = db.Column(db.String(32))
    user_type = db.Column(db.Integer)

    def __repr__(self):
        return '<UserBase %r>' % self.name

